import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '分站信息',
    align:"center",
    dataIndex: 'branchId_dictText'
   },
   {
    title: '填报师信息',
    align:"center",
    dataIndex: 'teacherId'
   },
   {
    title: '分配金额',
    align:"center",
    dataIndex: 'divideAmount'
   },
   {
    title: '分配类型',
    align:"center",
    dataIndex: 'divideType_dictText'
   },
   {
    title: '提现状态',
    align:"center",
    dataIndex: 'takeStatus_dictText'
   },
   {
    title: '提现时间',
    align:"center",
    dataIndex: 'takeTime'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
     {
      label: "创建日期",
      field: "createTime",
      component: 'RangePicker',
      componentProps: {
          valueType: 'Date',
          showTime:true
      },
      //colProps: {span: 6},
	},
	{
      label: "订单号",
      field: 'orderNo',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "分站信息",
      field: 'branchId',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"bee_branch_base,name,id"
      },
      //colProps: {span: 6},
 	},
	{
      label: "填报师信息",
      field: 'teacherId',
      component: 'Input',
      //colProps: {span: 6},
 	},
     {
      label: "提现时间",
      field: "takeTime",
      component: 'RangePicker',
      componentProps: {
          valueType: 'Date',
          showTime:true
      },
      //colProps: {span: 6},
	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '订单号',
    field: 'orderNo',
    component: 'Input',
    dynamicDisabled:true
  },
  {
    label: '分站信息',
    field: 'branchId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"bee_branch_base,name,id"
     },
    dynamicDisabled:true
  },
  {
    label: '填报师信息',
    field: 'teacherId',
    component: 'Input',
    dynamicDisabled:true
  },
  {
    label: '分配金额',
    field: 'divideAmount',
    component: 'InputNumber',
  },
  {
    label: '分配类型',
    field: 'divideType',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"bee_divide_type"
     },
  },
  {
    label: '提现状态',
    field: 'takeStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"bee_take_status	"
     },
  },
  {
    label: '提现时间',
    field: 'takeTime',
    component: 'DatePicker',
    componentProps: {
       showTime: true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}